from SimulatedAnneling import SimulatedAnneling
from KQueensStateManager import KQueensStateManager

class KQueensSA(SimulatedAnneling):

	#each specific problem has it's own constrains that are added to the general problem
	def __init__(self, k):
		self.k=k
		super(KQueensSA, self).__init__()
	
	#this method only init the problem with the k-queens specific constraints b4 calling the parent class method
	def simulateAnneling(self):
		self.initStateManager(self.k)
		#calling the parent class method
		return super(KQueensSA, self).simulateAnneling()
		
	def initStateManager(self, k):
		self.localStateManager = KQueensStateManager(k)
		self.localStateManager.generateInitState()